Mass storage memory devices such as flash cards, USB (“universal serial bus”) sticks, or solid-state disks use flash semiconductor structures to store data in a nonvolatile memory device. A nonvolatile memory device refers to a memory device for which a power source can be switched “off” without losing the contents of the memory. Nonvolatile memory devices include flash memory devices that may semi-permanently retain an electric charge to represent one or more bits, or a “hard disk” (also referred to as a “hard drive”) that may a semi-permanently retain a magnetic charge to store one or more bits. Semiconductor devices such as SRAMs (static random access memories) and DRAMs (dynamic random access memories) are referred to as volatile memory devices because they lose the contents of their memories if a bias voltage source is switched off. A bias voltage source includes, without limitation, a power converter coupled to an electrical source of power or a battery that may be located internal or external to the memory device.
Today's magnetic-based mass storage devices such as floppy disks or hard disks are organized in so-called sectors (a sector of being a portion of a “track” in the disk), each sector typically storing 512 bytes (in magnetic disks), and each sector identified with an individual logical block address (LBA). An LBA is a logical addressing scheme wherein a fixed one-to-one relationship is established between a sector of data and the physical location on the disk in which the respective sector of data is stored. The operating system of a computer collectively handles the LBAs of the mass storage device and builds a file system based thereon. The computer operating system reads and writes sequential amounts of LBAs with different block sizes from and to the mass storage device. In a hard disk, data can be freely written, read, or rewritten one or more sectors at a time.
Unlike magnetic memory devices, in flash memory devices there are some restrictions regarding reading and writing of data. Flash memory devices are organized in pages (typically of size 4 kB (kilobytes) plus data protection headroom) and in erase blocks (also referred to herein as a “block”) for example, an erase block of size 64 pages. Accordingly, a 4 kB page of flash memory can store eight 512-byte sectors. A page of flash memory that is not programmed, i.e., a page that does not already contain data, can be written only as an entire page. Similarly, data can be read one page at a time. Flash memory has a further restriction in that it can be erased only a block at a time. Thus, to rewrite selected data in a portion of memory, an entire block must be read, erased, the new data merged with the previous data, and the merged data rewritten as a block. Data can thus not be overwritten except as an entire block. Writing and rewriting is generally referred to as programming. In a typical (NAND structured) flash memory, a page is written to all 1's to erase previously stored data, and can then be rewritten with the intended data. In addition, a block of data is typically written to a different physical portion of the flash memory device to alleviate a wear-out problem associated with repetitively storing data in the same memory location in such devices. A translation table stored in nonvolatile memory of the flash memory device is thus required in the communication link with a host computer to logically associate a sector of data with its physical location, which is generally moved each time it is rewritten. The restrictions of reading, writing, and rewriting in a flash memory device are also applicable to the translation table stored therein.
Due to the limitations of writing to flash memory devices described above wherein each write access requires a readout of an entire erase block, doing the erase and merging operations, and then writing the entire block back to a new location with the merged data, a fixed mapping of the LBAs to physical flash memory addresses is inadequate for managing data stored in such devices. In the ordinary operation of a host computer, there are typically small amounts of data that are required to be copied and merged into a new flash memory device location. Therefore a mapping table (an LBA translation table) must be constructed and managed to track which LBA has been stored to which flash memory device address. It is important that this logical-to-physical address translation table is stored by some means in the nonvolatile flash memory device to enable quick access to the data therein immediately after power up. Since there can be unexpected power-down scenarios, a means for table recovery from nonvolatile stored data should be provided.
Thus, there is a need for a process and related method to construct and manage a translation table stored in nonvolatile memory of a flash memory device that allows transfer of data from a host computer to the flash memory device that avoids the inefficiencies of conventional processes, and that can preserve the integrity of such a table during an interruption of a bias voltage source.